import request from '@/utils/request'
// 停车场管理渲染数据
export const getAllCarPort = (params) => {
  return request({
    url: '/carport/all',
    method: 'get',
    params: params
  })
}
// 停车场编号
export const getAllParkingId = () => {
  return request({
    url: '/carport/all/parkingId',
    method: 'get'
  })
}

// 绑定小区
export const getAllParkingName = () => {
  return request({
    url: 'base/communityName',
    method: 'get'
  })
}

// 删除接口
export const deleteCarportById = (data) => {
  return request({
    url: '/carport/delete',
    method: 'delete',
    data
  })
}

// 停车卡管理接口

// 修改接口
export const updateCard = (data) => {
  return request({
    url: '/parking/update',
    method: 'put',
    data
  })
}
// 删除接口
export const deletCard = (data) => {
  return request({
    url: '/parking/delete',
    method: 'delete',
    data
  })
}

export const addCard = (data) => {
  return request({
    url: '/parking/add',
    method: 'post',
    data
  })
}

// 新增接口
// export const addCarport = (data) => {
//   return request({
//     url: '/carport/add',
//     method: 'post',
//     data
//   })
// }

// 停车订单管理接口
export const getAllParkingOrder = (params) => {
  return request({
    url: '/parking/order',
    method: 'get',
    params: params
  })
}

// 停车卡管理页面渲染
export const getAllParkingCard = (params) => {
  return request({
    url: '/parking/card',
    method: 'get',
    params: params
  })
}

// 收费细节管理
export const getAllParkingRule = (params) => {
  return request({
    url: '/parking/rule',
    method: 'get',
    params: params
  })
}